package lab03.test1;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class Test {
    public static void main(String[] args)  {
        String path="D:\\hello.txt";
        BufferedReader reader=null;
        try {
            reader= new BufferedReader(new FileReader(path));
                    String line = null;
                    while ((line = reader.readLine())!=null){
                        System.out.println(line);
                    }
                } catch (IOException e) {
            e.printStackTrace();
        }
        finally {
            try {
                reader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}

